<!DOCTYPE html>
<html>
<head>
	<title>每一个HTML标记，都对应一个元素对象</title>
	<meta charset="utf-8">
	<script type="text/javascript">
		window.onload = function(){
			 //获取网页中id=img01的图片对象
			var imgObj = document.getElementById('img1');
			//修改图片的属性的值，图片标记的属性，元素对象也能用。
			imgObj.src = "http://img.php.cn/upload/course/000/000/009/580ae23c4a88a881.jpg";
			imgObj.width = 400;
			imgObj.border = 2;
			imgObj.style = "cursor:pointer";
			imgObj.title = "唯美图片";
			  //核心DOM中的属性方法，元素对象都能用
			imgObj.parentNode.bgColor = "#f0f0f0";
		}

	</script>
</head>
<body>
	<img id="img1" src="/upload/course/000/000/009/580ae23c4a88a881.jpg" />

</body>
</html>